package com.bawei.lizhiyu1228.mvp.p;

import com.bawei.lizhiyu1228.mvp.m.IModel;
import com.bawei.lizhiyu1228.mvp.v.IView;

/**
 * @author : zhiyu
 * @date : 2021/12/28
 * @content :
 */
public class BasePresenter<V  extends IView,M extends IModel> implements IPresenter {

    protected V mView;
    protected M mModel;

    public BasePresenter(V mView, M mModel) {
        this.mView = mView;
        this.mModel = mModel;
    }

    @Override
    public void destroy() {
        if (mView!=null){
            mView=null;
        }
        if (mModel!=null){
            mModel.destroy();
        }
    }
}
